package org.estela.comp;

import java.util.LinkedList;
import java.util.List;

public class ClassMethod {

	private DataType dataType;
	
	private String name;
	
	private List<DeclareReference> argumentList = new LinkedList<DeclareReference>();
	
	private List<Statement> body = new LinkedList<Statement>();

	private DataType returnType;
	
	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public DataType getDataType() {
		return dataType;
	}

	public void setDataType(DataType dataType) {
		this.dataType = dataType;
	}

	public List<DeclareReference> getArgumentList() {
		return this.argumentList ;
	}

	public List<Statement> getBody() {
		return this.body;
	}

	public void setArgumentList(List<DeclareReference> argumentList) {
		this.argumentList = argumentList;
	}

	@Override
	public String toString() {
		StringBuilder buff = new StringBuilder(getClass().getName());
		buff.append("[name=").append(this.name);
		buff.append(", dataType=").append(this.dataType);
		buff.append(", args=").append(this.argumentList);
		
		buff.append(']');
		return buff.toString();
	}

	public DataType getReturnType() {
		return this.returnType;
	}

	public void setBody(List<Statement> body) {
		this.body = body;
	}

	public void setReturnType(DataType returnType) {
		this.returnType = returnType;
	}
	
}
